source "${BOSS_Afterburner}/setup/FunctionsPrint.sh"
source "${BOSS_Afterburner}/setup/Functions.sh"

cd "${BOSS_Afterburner}"

configs=(
  config/D0omega_K4pi/PlotBranches/*
  config/D0omega_K4pi/Fit/Model/*
  config/D0omega_K4pi/CutFlow/*
  config/D0omega_K4pi/Fit/LikelihoodUL/*
)

for i in ${configs[@]}; do
  for j in $(ls $i | grep -E yaml$); do
    AttemptCommand "RunAnalysis ${i}"
    if [[ $? != 0 ]]; then
      PrintError "Failed to run analysis for \"$i\""
      exit 1
    fi
  done
done

echo